For example, the color temperature of a candle flame, sunrise and sunset have the same color temperature, knowing that its color temperature is the same, could you say that these sources are similar or equivalent? Could you say that they would produce the same picture of a scene? Could you say that the values of the pixels are the same with these three sources of light? Thanks in advance
It's roughly true that light sources with the same color temperature have the same appearance. In fact, matching light sources in this way is exactly the reason we use the Kelvin WB scale in photography. However, there are three big caveats.
First, there's also a magenta-green axis
Human perception of color is complicated. White balance as measured in Kelvin is simplification of one aspect of that perception, basically relating to orange/blue balance. This is reasonably helpful for light sources that approximate blackbody radiation, but doesn't fit for a lot of artificial light sources, which may tilt more towards green or magenta — tints which are off the Kelvin WB scale. See How does Kelvin for color temperature relate to Kelvin for actual temperature? for details on the Kelvin scale, and Relationship between tint-temp and magenta-green-blue-amber white balance corrections?
Second, not every light source covers a complete spectrum
Sunlight filtered through the atmosphere, or the candlelight you mention, or an incandescent bulb — all of these have a clear weight on that Kelvin scale, but they also put out light across the visible spectrum (and into the invisible infrared and ultraviolet). This is not the case with gas-discharge or fluorescent light sources. That includes sodium-vapor streetlights, fluorescent bulbs, and LED lighting.
Our perception of color depends on wavelengths reflected by the lit objects in the scene. If those wavelengths are reduced (or entirely missing) in the source light, they can't be reflected, and that alters our perception of color.
For more on this, see What is Colour Rendering Index (CRI)? — and Can I color-balance a photo if I know the light source within the photo?, where someone wants to balance color but is limited by the narrow-band light source.
Third, the numbers are nominal.
No candle flame snaps to exactly 1800K, and the color of sunrise and sunset is so complex that it's probably safe to say that literally every one is different. The labeled values on lights are not precise — probably more so for gear designed for photography, but consumer light bulbs will vary quite a bit from what the box says (as well as from brand to brand).
Could you say that the values of the pixels are the same with these three sources of light?
And in practice, no, this is completely unlikely.
They may, however, be similar enough that they work together in a single photograph without causing the disruptive look we get when one area of the photograph is cool blue and another quite orange due to mixed lighting.
In your example of a bulb rated 2800K and a sunrise or sunset coming through a window (nominally 2400K), the window light may look a little warm (that is, warm in the artistic rather than physical sense: more orange) in your photograph balanced for the 2800K bulb — but then, that may be exactly what you want.
Color temperature models a color spectrum only for blackbody radiation. This is pretty much perfect for plasma balls like the sun as seen from space. It also works to some degree for daylight (which is composed of a blue sky in the form of scattered sunlight and a yellowish tinted sun, together approximating the original sunlight). However, at dawn and sunset, there is a whole lot more of scattering and absorption going on. This doesn't change the temperature of the original light source but heavily modifies its spectrum. The result is not comparable to blackbody radiation even though it is a mostly continuous spectrum.
In contrast, a candle flame is more or less "the real thing" with regard to corresponding to blackbody radiation.
How much does this difference matter with regard to colors? Well, you rarely photograph direct light sources (like sun or candle flame) as primary objects, instead you are interested in the reflection of their light from colored surfaces. A non-white surface does not reflect light in the three primary colors RGB but rather in a continuum of the light spectrum (fluorescent colors are worse since they may respond with light of a different wavelength from what they are hit with, but let's not look at them for now). Thus even if, for the sake of argument, you manage to get matching colors from imaging a candle flame and a sunset, that doesn't mean that the scene lit by them exhibits the same color.
This is sort of the bane of paint manufacturers: they cannot afford to match paints using an RGB (or other merely three-dimensional) model since that only works assuming one particular light source wavelength distribution. At the worst, paints match perfectly in daylight and diverge already when it gets overcast. Making paints of different composition match even under a variety of flourescent lightings is a nightmare.
It wouldn't be accurate to say the sources are the same but it would be accurate to say the they are similar. Atmospheric differences (moisture, dust, etc.) can change the color temperature of the sun not just from day to day, but even from minute to minute.
Since lighting conditions are often dim, if you want to photograph a subject in these conditions, a flash might be used. You can use a CTO gel on the flash (CTO = Color Temperature Orange) to bring the color of the flash closer to the color of the candlelight or sunlight so that any color-adjustments performed in post processing wont have radically different color temperatures. But even the CTO gels come in 1/4, 1/2, 3/4 and full CTO strength (depending on whether you need a pale yellow/gold vs. an intense orange).