The issue of how consciousness arises and how one should define it have been central to psychology even before it was consider a "science" (Pre-Wundtian times, that is) and surely will continue for a long while. Everyone from Plato to James having some say on the issue. But only recently has real critical attention been given to the issue, and sadly this is largely to blame for the Behaviorist revolution which asserted the mind and consciousness to be little more than a "black box" or grammatical trap; influencing behavior very little. And lamentably, this was the main doctrine in American from Post-WW1 to the late 1950s to early 1960s. Though it still survives today, given only insofar as its valid scientific findings are concerned.
Honestly though, since the cognitive revolution in psychology, it is a surprise that the modern bio-psychological perspective in psychology and neurology have had the most to say on the issue. With more cognitive based perspectives in psychology only adding information on the so called "symptoms of consciousness" (Given of course it is still not a very well defined term.) and how it outwardly affects observable behavior. Still, to give my views on the subject I must first go into some depth about the two main fields to contribute to the topic at hand.
From research done within neurology and bio-psychology--using things like CAT scans, fMRIs, etc. to view brain functions while a patient undergoes certain tests or performs certain tasks--lateralization of the brain hemispheres is apparent to some degree as is localization of function. The later term being used to describe the structure-function relation of the brain, e.g. the fact that each structure of the brain carries out certain localized--though overlapping--functions. For example, when receiving perceptual stimulus, let's say from seeing something, the wavelengths being emitted from the object travel to various regions of the eye (The exact process a bit to arcane to spell out here). When certain rods or cones receives these wavelength, they transmit the signal into an electro-chemical signal. This information passes from the eyes, crossing sides into the opposite hemisphere where a process of decoding takes places. This decoding--once finished--is then evaluated by the "mind's eye" (As Gestaltist psychology made clear) and then more elaborate processes of response, ignorance and inaction, or emotional evaluation take place. And this is where the next key finding of these two fields comes in.
It has often been noted that several actions, be it hitting a ball with a bat, artistic behavior, or reacting to a punch, seem to defy proper calculations. To build on the example above, let us assume that the image we describe being perceived in the above paragraph is a fastball coming at a batter in a Baseball game. Screening out the cheers of the fans, the heat of the sun, the smell of sweat and dirt, his brain sees a fast ball screaming through the air at him. Now, this is where it gets interesting. Because normally, even if his brain was operating at its utmost peak of performance, it would be too slow to calculate what to do in a linier fashion (I.e. the visual information of the position of the ball, calculations of timing, then moving on to a reaction to that perceived stimulus; to give an over simplified example). What research psychologists and neurologists have found, and what cognitive psychologists have inferred existed, is a series of parallel processes of calculations and interpretation. Thus meaning that the brain operates on multiple levels of reasoning and evaluation at any given point in time; explaining why and how certain tasks can be done when they seemed to defy possibility in the linier interpretation of brain functions.
Now I am sure you are a little tired of this pretentious, verbose monologue. And I am sure you are saying, "So what?" Indeed, what I have written likely seems completely off topic and unrelated. But here is where I get to the point: if all of this were to hold true, a reasonable assumption or hypothesis of consciousness can be made. That is that consciousness is the overlapping and parallel functioning of higher level brain operations and structures in the forebrain. This alone can, theoretically, lead to an organisms self-awareness and that alone is a major facet of consciousness that--even with only a vague definition of it--almost any psychologist would agree with. Furthermore, it could also lead to definitive influences on behavior as observed by social and cognitive psychologists.
This is not to say that consciousness is not this beautiful facet of humanity that it was prior to such research. It still is, and whether by evolutionary genius or complete accident, it occurred, creating the single greatest human trait known to man. not only giving us more adaptive survivability, but allowed the creation of atypical behavior that contradicts evolutionary sensibility. It is this last thing, more than any other, that defines humanity, and without consciousness and mind, we likely wouldn't have it.
As for when it starts, I would say around the third trimester, when there is sufficient brain development for it to be created. For even if consciousness is not completely neurological like I purport, if brain lesions or surgical removal of brain tissue is done, you can essentially "remove" certain aspects or personality, emotion, self-awareness, and all other things related to "consciousness". Thus while it may not even be completely biological and neurological, it this fact alone proves that it has some grounding in such things. More on topic, it shows that there must be sufficient brain growth and development before consciousness even surfaces.