X-rays see bones not ligaments which are what get injured in a sprain. Ligaments are soft tissues like the rest of your skin and such and hence may not show up well on the x-ray.
There can be some indirect signs but these don’t always occur, for example:
A ligament tear that tears off a piece of bone with it
Widening of the joint space reflecting instability of the joint as a result of a ligament tear
X-ray images are shadows of the tissue. Bones are really opaque so show up really clearly. Soft tissues, including cartilage, muscles, ligaments, fat and skin are almost totally transparent, so only show up super faintly.
The actual ligament itself only shows up the same as muscle - so when the two are next to each other, they just blur into each other because you can't see an edge where there is a difference.
However, you can sometimes see hints of a sprain. There may be swelling of the tissue around the ligament. While you might not be able to see any detail, you could see that things are swollen under the skin. Sometimes a sprain also damages the bone by pulling a small flake of bone off where the ligament attaches to the bone. The bone flake can be easily seen in many cases. The bones of the joint might have moved out of position of the ligaments holding them together have been damaged.
X-rays work because to x-rays your bones have a very different reflective quality compared to muscles, skin and tendons.
While you can see any damage to bones, or any sort of misalignment of bones (which is something that can happen if the tendons that fix the bone into place are damaged) you can't see the tendons themselves.
In cases where doctors do need to see tendons&ligaments they use Magnetic Resonance Imaging (MRI), but they tend to avoid that as MRI machines are super expensive to buy and use (although it's becoming more common, especially with hand, feet and knee injuries).
A physician can tell it's a sprain by physically examining the injury and by the symptoms. The x-ray is just to make sure there isn't any damage to the bone. And they only need that because sometimes* it changes how they treat the injury.
Injuries to tendons and ligaments, because there is a lot less blood flow to that tissue, takes longer to heal. Bones have a lot of blood, and heal relatively faster. But if you've had enough energy to break a bone, you have also injured all the tendons and ligaments around it - but when you treat the broken bone - it's the same treatment that allows tendons and ligaments to heal (most of the time*.)
This isn't quite the question you asked, but other people have already answered that. I'm sorry you are hurting, and I hope you heal well.
​
*If it isn't healing well, and there isn't a bone fracture, then they may want an MRI - which is more sensitive, but also more expensive.
PartTimeBomoh t1_ixpr0t2 wrote
X-rays see bones not ligaments which are what get injured in a sprain. Ligaments are soft tissues like the rest of your skin and such and hence may not show up well on the x-ray.
There can be some indirect signs but these don’t always occur, for example: A ligament tear that tears off a piece of bone with it Widening of the joint space reflecting instability of the joint as a result of a ligament tear