The theory that consciousness is simply an emergent property of complex systems has been gaining adepts lately.
The idea may be originally due to Giulio Tononi, from the University of Wisconsin in Madison. Tononi argued that a system that exhibits consciousness must be able to store and process large amounts of information and must have some internal structure that cannot be divided into independent parts. In other words, consciousness is a result of the intrinsic complexity of the internal organization of an information processing system, complexity that cannot be broken into parts. A good overview of the theory has been recently published in the Philosophical Transactions of the Royal Society.
The theory has been gaining adepts, such as Max Tegmark, from MIT, who argues that consciousness is simply a state of matter. Tegmark suggests that consciousness arises out of particular arrangements of matter, and there may exist varying degrees of consciousness. Tegmark believes current day computers may be approaching the threshold of higher consciousness.
Historically, consciousness has been extremely difficult to explain because it is essential a totally subjective phenomenon. It is impossible to assess objectively whether an animal or artificial agent (or even a human, for that matter) is conscious or not, since, ultimately, one has to rely on the word of the agent whose consciousness we are trying to assert. Tononi and Tegmark theories may, eventually, shed some light on this obscure phenomenon.