Let's work from the speaker backwards to the sound source.
To move a speaker to generate sound, and hence reproduce music, we need to apply a varying voltage (with sufficient current).
So could a photocell provide varying voltages with sufficient current to move a loudspeaker? Maybe. The voltage and current output by a photocell varies with the illumination it receives; more energy from its illumination, the higher the voltage it produces. (However, there might not be enough power to drive the speaker directly from something as low power as a laser pointer, but see below.)
There are several papers on the net describing experiments to transfer power to a solar cell using lasers. The application area was powering satellites and space craft. One paper is 'Response of silicon solar cell to pulsed laser illumination'
It isn't an ideal paper, but it is free. They used a laser pulsed at 20kHz to illuminate the solar cell, and hence transfer power to it.
They found that the solar cell integrated quite short laser pulses over time, so the highest frequency that could be transferred by the solar cell appears to be about 10kHz (though they weren't really trying to find this frequency, and so I may be extrapolating from some of their graphs wrongly).
It appears that more laser pulses in the same time period do give higher voltages and currents. This doesn't seem surprising, but is reassuring.
Summary so far: illuminate the solar cell for longer, at about 10kHz (100microseconds), and the solar cell will generate a higher voltage. Hence their power transfer experiments indicate it is be able to transfer amplitude by laser illuminating the solar cell for longer. (though in their case it was using more pulses).
So if the laser illuminates the solar cell for varying amounts of time during each 100 microsecond period (10kHz), a vary signal, converting the illumination duration back to an analogue voltage will be generated by the solar cell.
A laser pointer is only a few mW, so even at 50% efficiency, the output of the solar cell won't have much energy. I haven't done the math, but I'd assume the loudspeaker will be a high impedance, ie. not 8ohms, but maybe a piezo speaker, or their is an amplifier between the solar cell and the speaker.
So, if you sample audio at about 10kHz (filtered to remove higher frequencies than 5kHz, and hence remove aliases), and use that value to control the duration of laser illumination, the audio signal will be transferred to the solar cell.
As Transistor explains, audio may already be digitally encoded, for example Pulse Code Modulation is used for compact disks and computer audio.
So a relatively straightforward program could process that data to a suitable sample rate and dynamic range.
As a concrete example, we might use 10 bits (1024) to represent the audio signal amplitude. So we want to transmit a 10 bit value, represented by the amount of time the laser is illuminated, in each 100 microsecond period. Using a clock of 100 microseconds/1024 approximately equals 10MHz, hardware could control the time the laser pointer is on using Pulse Width Modulation (PWM). PWM is very common hardware in microcontrollers. PWM hardware is essentially a counter, which triggers a single output pin when a count matches the amplitude value, generating a variable length pulse, in this case a 10bit amplitude value, represented as a varying duration, every 100 microseconds.
To put this into context, you could build a version of this using an Arduino with a SD card shield to hold the audio data, and one of the Arduino's ATmega328's hardware timers to generate the PWM signal. Then a transistor to switch the laser pointer on. I'd try a piezo speaker on the solar cell to hear if it would work, though I'd expect to use a small amplifier to drive a speaker.