There are many reasons for the problem you are having:
# The earpiece could possibly be faulty or even broken. It may need to be replaced.
# The speaker might not be working properly and a new one would need to be installed.
# If your phone as been in contact with water recently then there may be some water damage in the speaker.
For more help please visit the device's troubleshooting page:
[[Motorola Photon 4G Troubleshooting|Motorola Photon 4G Troubleshooting]]