When you shoot into the sun and you place the brilliant hotspot in the center of the frame, the picture will be very dark. This happens because most of the metering information is taken from the center of the composition, and meters only understand 'middle gray', i.e. middle tones. If the center of the picture includes the sun, the meter erroneously assumes the scene is so bright that it needs less light. Hence, underexposure. The subject appears very dark or even black against the bright light source.
In this situation, you have two choices: (1) accept the silhouette interpretation of the subject, or (2) add light to the foreground so the subject is illuminated. For the photo above that I took a few days ago in Venice, Italy, I chose the latter approach. I used fill flash to even the exposure between foreground and background.