Your biggest problem is going to be light. Sunflowers need at least 6-8 hours of direct sun per day to grow properly and flower, so 4 hours a day is going to be tough. They'll end up stunted, might not even flower or the flowers come out small and weak. If your balcony only gets sun from one direction, try moving the pot to catch more light throughout the day, but honestly it's going to be hard to make it work well in those conditions.
If you really want to try, use a pot that's at least 25-30cm deep because sunflowers have roots that go pretty far down. The soil has to be well-draining (mix soil with sand or perlite, you don't want waterlogging), and pick a dwarf or medium-sized variety, not those giant ones that need space and even more sun. Water when the soil is dry in the top few centimeters, but don't overdo it.
Extra tip: if you still want to add color to your apartment, consider other plants that tolerate partial shade and small pots. But if your heart is really set on sunflowers, it'll only work well if your balcony gets more hours of direct sun.