There is considerable debate among the Halachic authorities as to whether or not wearing a Kippa constitutes an outright obligation. The Hid"a (Rabbi Hayim Yosef David Azulai, Israel, 1724-1806) classified wearing a Kippa as a "Midat Hasidut" (measure of piety), rather than a strict requirement. Others, however, including the Taz (commentary to the Shulchan Aruch by Rabbi David Ben Shemuel Halevi, Poland, 1586-1667), held that nowadays wearing a Kippa is required according to the strict Halacha. Chacham Ovadia Yosef, in a famous responsum, noted that wearing a Kippa nowadays serves as a symbol of one's affiliation with the observant Jewish community, and one should therefore make a point of wearing a Kippa at all times, except, of course, when he bathes and the like. According to the teachings of Kabbala, one should wear a Kippa even while he sleeps.
It is therefore proper to wear a Kippa at all times, both in and out of the home, particularly in light of the fact that we generally live in safe neighborhoods where there is no immediate threat of anti-Semitic hostility. Wearing a Kippa has the effect of reminding a person of God's presence over him, which will cause him to conduct himself with a greater sense of humility of fear of God. Of course, one need not wear a Kippa outdoors if this would expose him to danger.
One should be especially careful to wear a Kippa when praying or reciting a Beracha. The Halachic authorities debate the question of whether one must repeat a prayer or Beracha that he recited without wearing a Kippa. Chacham Ovadia Yosef ruled that one does not repeat the prayer or Beracha in such a case.
How large a Kippa must one wear?
Chacham Ovadia Yosef rules that one should preferably wear a Kippa that covers the majority of his head. At very least, he adds, one's Kippa should be large enough to be seen from all sides.
Summary: One should wear a Kippa at all times, except when he bathes and the like, both indoors and outside, unless this will expose him to danger. One need not repeat a prayer or Beracha recited without a Kippa. One's Kippa should be large enough to cover the majority of his head, or at least to be visible from all sides.