I have heard that algebraic spaces have better formal properties than schemes. What are these benefits? Also, is there a natural way to go straight from affine schemes to algebraic spaces bypassing the locally ringed space construction?

1$\begingroup$ "They possess better formal properties than schemes, but are still geometric enough to allow us to import many definitions and properties from scheme theory." tolypreygel.com/notes/note_stacks.pdf $\endgroup$ – Praphulla Koushik Sep 7 '19 at 14:26
The better formal property is that algebraic spaces are closed under taking quotients of etale equivalence relations (in practice typically coming from group actions), while schemes are not.
One can define then directly from affines as done in Toën A master course in algebraic stacks, Cours N° 2 (in French; this source gives also a nice impression of the difference/similarity of schemes and alg. spaces and shows how they are exactly designed to support more quotients)

2

1$\begingroup$ @Arrow, usually you can do it using web.archive.org. $\endgroup$ – evgeny Mar 10 '17 at 21:26
Here is one intuitive way to think about it:
A scheme is something which is Zariskilocally affine, whereas an algebraic space is something which is etalelocally affine.
One way to make this precise: a scheme is the coequalizer of a Zariskiopen equivalence relation, whereas an algebraic space is the coequalizer of an etale equivalence relation.
Another way is to say that, as a functor on rings, a scheme has a Zariskiopen covering by affine functors, whereas an algebraic space has an etale covering by affine functors (thus bypassing reference to locally ringed spaces, regarding your second question).
Why do we care? A priori, if you want to work in the etale topology anyway, why not fix the definition of scheme to say "etalelocally affine" instead of "Zariskilocally affine". This is just one motivation for studying algebraic spaces, which you can read more about in Laumon, MoretBailly Champs algébriques.
(Edit: For "a fortiori" reasons to study algebraic spaces, I'll just say read the other answers :)

2$\begingroup$ Pity I could not see this before. It raises a natural question, let me still try to ask it here, if there will be no response maybe I will make a question. Are there any sensible notions produced if one plays this game with other topologies? $\endgroup$ – მამუკა ჯიბლაძე Mar 11 '17 at 21:49
One of them was answered in response to question 1558 on when quotients of schemes by free group actions exist. When the group is finite, they exist as algebraic spaces. But, there are examples where they do not exist as schemes. So, being closed under quotients by free finite group actions is certainly nice.
I know the second part of your question is explained in the first couple of sections of Champs algebriques. They define a space as a covariant functor from algebras to sets that satisfies descent. Then, an algebraic space is such a functor that has an etale cover by the functors associated to some affine schemes. I don't really remember the details here.

$\begingroup$ Are questions numbered? That's a fine feature, but where do the numbers show? $\endgroup$ – Georges Elencwajg Oct 29 '09 at 9:27

$\begingroup$ The number 1558 appears in the URL of the question. But note that questions aren't necessarily numbered consecutively (but increasingly). These numbers probably are some internal id. $\endgroup$ – Armin Straub Oct 29 '09 at 15:03

2$\begingroup$ Actually, every post (question or answer) is numbered, and the numbers are consecutive. For example, this answer is number 3201 (you can get this by clicking the "link" link at the bottom of the answer and looking in the URL). If you try the URL mathoverflow.net/questions/3201, you'll be brought directly to this answer. $\endgroup$ – Anton Geraschenko Oct 29 '09 at 18:29

$\begingroup$ Eek, "free group actions" is a scary phrase, due to the two ways of parenthesising it (though here the context makes clear what is meant). $\endgroup$ – LSpice May 2 at 23:54
In addition to being closed under taking quotients by etale equivalence relations, algebraic spaces are also closed under taking quotients by arbitrary finite group actions (need not be free, so the induced relation need not be etale). I only realized this recently, but I think the following argument is correct.
Suppose G is a finite group acting on an algebraic space X. Then the stack quotient [X/G] is a DeligneMumford stack (it has an etale cover by X). By the KeelMori theorem, DM stacks have coarse spaces. Let [X/G]→Y be the coarse space of [X/G]. Then Y is an algebraic space and the map [X/G]→Y is universal for maps from [X/G] to algebraic spaces. This means that Y is a categorical quotient of X by G. In fact, I think Y might actually be a geometric quotient (or at least a good quotient) of X by G, but I haven't unraveled all the definitions yet.

1$\begingroup$ You need to assume that [X/G] has finite inertia for the KeelMori theorem to apply. This happens exactly when every stabilizer X^g is a closed subscheme. An important case is when X is separated. $\endgroup$ – David Rydh Nov 3 '09 at 4:13