It behaves the same as geom_line. The only time a group aesthetic is usually necessary is to make line/smooth plots with a discrete x variable.
As @lbusett was pushing towards, that gets to why you're getting unpredictable behavior, too: you're asking geom_smooth to do two things. Setting a colour aesthetic tells it to split the smooths in the second facet in two, but the group aesthetic tells it that there should only be one per facet.
If you want a smooth for each set of var1 values per panel, just drop the group aesthetic:
df <- data.frame(id = c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 8L, 8L, 8L, 8L, 9L, 9L, 9L, 9L, 10L, 10L, 10L, 10L, 11L, 11L, 11L, 11L, 12L, 12L, 12L, 12L, 13L, 13L, 13L, 13L, 14L, 14L, 14L, 14L, 15L, 15L, 15L, 15L),
x = c(0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4, 0.25, 0.5, 0.75, 1, 4),
y = c(-0.0302378232761063, 0.38491125525836, 1.52935415707456, 1.03525419571229, 8.06464386758047, 1.35753249344164, 1.2304581029946, 0.867469382696733, 2.65657357405324, 11.77716901495, 1.36204089871973, 1.67990691352868, 3.20038572529703, 4.05534135797256, 15.722079432623, 1.89345656840154, 2.74892523911462, 2.76669142168518, 5.35067795078184, 19.763604296136, 0.966088147006577, 2.89101254267085, 3.98699777584638, 5.63555438535443, 27.6874803660754, 0.906653344628793, 3.91889352224726, 5.32668655891826, 7.43093153149403, 32.626907460535, 1.71976217672389, 3.88491125525836, 7.52935415707456, 9.03525419571229, 36.0646438675805, 3.10753249344164, 5.2304581029946, 6.86746938269673, 9.65657357405324, 39.77716901495, 3.36204089871973, 5.67990691352868, 8.45038572529703, 11.0553413579726, 47.722079432623, 3.89345656840154, 6.24892523911462, 8.01669142168518, 13.3506779507818, 51.763604296136, 2.71608814700658, 6.39101254267085, 9.98699777584638, 13.6355543853544, 55.6874803660754, 2.65665334462879, 7.91889352224726, 11.3266865589183, 14.430931531494, 60.626907460535),
panel = c(5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10),
var1 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("0", "1"), class = "factor"),
var2 = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("0", "1"), class = "factor"))
library(ggplot2)
ggplot(df, aes(x, y, colour = var1, shape = var1)) +
geom_point() +
geom_smooth(method = 'loess', se = FALSE, span = 2/3) +
facet_wrap('panel', scales = 'fixed', ncol = 1) +
scale_color_manual(values = c('blue', 'red'))

If you want a single smooth per facet, only set the colour aesthetic for geom_point:
ggplot(df, aes(x, y)) +
geom_point(aes(colour = var1, shape = var1)) +
# changed line color to gray so as not to confuse default blue with var1 0's blue
geom_smooth(colour = 'gray40', method = 'loess', se = FALSE, span = 2/3) +
facet_wrap('panel', scales = 'fixed', ncol = 1) +
scale_color_manual(values = c('blue', 'red'))
